package uilayer;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class VareGUI extends JFrame {

	private JPanel contentPane;
	private MainMenuGUI mGUI;
	private static VareGUI frame;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					frame = new VareGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public VareGUI() {
		setTitle("Vare menu");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 710, 478);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JButton btnTilfjVare = new JButton("Tilf\u00F8j vare");
		btnTilfjVare.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});
		btnTilfjVare.setBounds(48, 54, 121, 40);
		contentPane.add(btnTilfjVare);
		
		JButton btnFindVare = new JButton("Find vare");
		btnFindVare.setBounds(48, 107, 121, 40);
		contentPane.add(btnFindVare);
		
		JButton btnRedigerVare = new JButton("Rediger vare");
		btnRedigerVare.setBounds(48, 160, 121, 40);
		contentPane.add(btnRedigerVare);
		
		JButton btnSletVare = new JButton("Slet vare");
		btnSletVare.setBounds(48, 213, 121, 40);
		contentPane.add(btnSletVare);
		
		JButton btnRetPris = new JButton("Ret pris");
		btnRetPris.setVisible(false);
		//if(loggetInd instanceof Leder)
		//{
		//	btnRetPris.setVisible(true);
		//}
		btnRetPris.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});
		btnRetPris.setBounds(48, 266, 121, 40);
		contentPane.add(btnRetPris);
		
		JButton btnMainMenu = new JButton("Main menu");
		btnMainMenu.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				frame.dispose();
				mGUI.main(null);				
			}
		});
		btnMainMenu.setBounds(312, 54, 121, 40);
		contentPane.add(btnMainMenu);
	}

}
